package cn.webrx;

import java.util.Optional;

public class Optional1 {
    public static void main(String[] args) {
        Optional<String> os = Optional.empty();
        System.out.println(os.isPresent());

        Optional<String> os2 = Optional.of("hello");
        System.out.println(os2.isPresent());
        System.out.println(os2.orElse("java"));




    }
}
